package com.ruoyi.typing.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.typing.mapper.ExamMapper;
import com.ruoyi.typing.domain.Exam;
import com.ruoyi.typing.service.IExamService;
import com.ruoyi.common.core.text.Convert;

/**
 * 考试Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-12-20
 */
@Service
public class ExamServiceImpl implements IExamService 
{
    @Autowired
    private ExamMapper examMapper;

    /**
     * 查询考试
     * 
     * @param examId 考试主键
     * @return 考试
     */
    @Override
    public Exam selectExamByExamId(Long examId)
    {
        return examMapper.selectExamByExamId(examId);
    }

    /**
     * 查询考试列表
     * 
     * @param exam 考试
     * @return 考试
     */
    @Override
    public List<Exam> selectExamList(Exam exam)
    {
        return examMapper.selectExamList(exam);
    }

    /**
     * 新增考试
     * 
     * @param exam 考试
     * @return 结果
     */
    @Override
    public int insertExam(Exam exam)
    {
        return examMapper.insertExam(exam);
    }

    /**
     * 修改考试
     * 
     * @param exam 考试
     * @return 结果
     */
    @Override
    public int updateExam(Exam exam)
    {
        return examMapper.updateExam(exam);
    }

    /**
     * 批量删除考试
     * 
     * @param examIds 需要删除的考试主键
     * @return 结果
     */
    @Override
    public int deleteExamByExamIds(String examIds)
    {
        return examMapper.deleteExamByExamIds(Convert.toStrArray(examIds));
    }

    /**
     * 删除考试信息
     * 
     * @param examId 考试主键
     * @return 结果
     */
    @Override
    public int deleteExamByExamId(Long examId)
    {
        return examMapper.deleteExamByExamId(examId);
    }
}
